﻿using Microsoft.Extensions.Options;

namespace WxLib
{
    /// <summary>
    /// 微信接口账号信息
    /// </summary>
    public class WxApiOptions : IOptions<WxApiOptions>
    {
        public string UserAgent { get; set; } = "PmSoft.WxLib";

        /// <summary>
        /// APPID：绑定支付的APPID（必须配置）
        /// </summary>        
        public string AppId { get; set; } = "wxc9eb5602a0479c14";
        /// <summary>
        /// KEY：店面支付密钥，参考开户邮件设置（必须配置）
        /// </summary>        
        public string MchKey { get; set; } = "556BAF568C604B87B8DF80D5F378A5D1";
        /// <summary>
        /// 店面号（必须配置）
        /// </summary>        
        public string MchId { get; set; } = "1521823431";
        /// <summary>
        /// APPSECRET：公众帐号secert（仅JSAPI支付的时候需要配置）
        /// </summary>        
        public string AppSecret { get; set; } = "bd3641b9162d863dc70e86657a29653d";
        /// <summary>
        /// 证书路径,注意应该填写绝对路径（仅退款、撤销订单时需要）
        /// </summary>        
        public string CertPath { get; set; }
        /// <summary>
        /// 证书密码，默认店面号为密码
        /// </summary>
        public string CertPassWord { get; set; }

        WxApiOptions IOptions<WxApiOptions>.Value
        {
            get { return this; }
        }
    }
}
